from typing import Optional, Dict, List

from pydantic import BaseModel, FilePath

# 图片上传
class ImageUpload(BaseModel):
    image_path: FilePath
    eye_type: str

# 检测请求
class DetectionRequest(BaseModel):
    left_eye: ImageUpload
    right_eye: ImageUpload
    age: int
    sex: str


# 检测总结果
class DetectionResult(BaseModel):
    probabilities: Dict[str, str]

#   检测响应
class DetectionResponse(BaseModel):
    record_id: int
    result: DetectionResult
    message: str = "检测成功"

# 下面的没用
# 批量检测请求
class BatchDetectionRequest(BaseModel):
    image_paths: List[FilePath]
    user_id:int

# 批量检测响应
class BatchDetectionResponse(BaseModel):
    records: List[Dict]
    message: str = "批量检测成功"